//deep learning call 注意期望expect必须在0~1之间
#include"dnn.h"
struct dnn_cell a[16];
int main()
{
    srand( (unsigned)time(NULL) );
    double expect[8]= {0.23,0.23,0.23,0.23,0.83,0.83,0.83,0.83};
    double in[8][5]= {1,2,3,4,5,
                      1.1,2.1,3,3.9,5,
                      0.8,2.2,3,4.2,5,
                      0.9,2.1,3,4,5,
                      5,4,3,2,1,
                      4.9,4.1,2.9,2,1,
                      5,4,3.1,2,1,
                      5,4,2.9,2.1,1
                     };

    int i;
    for(i=0; i<16; i++) SetCell_InitAll(a,rand()*2.0/RAND_MAX-1,0.001);
    DNN_Train(a,4,in,expect,100000);
    double pp[5];
    while(1)
    {
        for(i=0; i<5; i++) scanf("%lf ",&pp[i]);
        printf("dnn %lf \n",DNN_Cal(a,4,pp));
    }
}
